import React, {useContext} from 'react';
//取出全局状态变量。代替父子传值props的作用
import { ColorContext } from './color';

function ShowArea(){
    // 得到变量
    const {color} = useContext(ColorContext)   
    console.log(color)

     return (<div style={{color:color}}>字体颜色为blue</div>)

}
export default ShowArea
